//微信登录
function setInfo(data) {
  wx.setStorageSync("user-info", data);

}
function getInfo() {
  return wx.getStorageSync("user-info");
}

//服务器登录
function setServiceUser(data) {
  wx.setStorageSync("serviceUser", data);
}
function getServiceUser(data) {
  return wx.getStorageSync("serviceUser");
}

//全局配置
function setGlobalConfig(config) {
  wx.setStorageSync("global-config", config
  );
}
function getGlobalConfig() {
  return wx.getStorageSync("global-config");
}
//微信code
function setWxCode(data){
  wx.setStorageSync("setWxCode", data);
}
function getWxCode() {
  return wx.getStorageSync("setWxCode");
}
module.exports = {
  setInfo: setInfo,
  getInfo: getInfo,
  setServiceUser: setServiceUser,
  getServiceUser: getServiceUser,
  setGlobalConfig: setGlobalConfig,
  getGlobalConfig: getGlobalConfig,
  setWxCode: setWxCode,
  getWxCode: getWxCode
}